using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ITS.DAL.Projects;
using ITS.Core.Domain.Projects;
using ITS.Factory;

namespace ITS.Services.Projects
{
    public class ProjectService : IProjectService
    {
        private readonly IProjectRepository _projectRepository;
        public ProjectService()
        {
            _projectRepository = NinjectRepositoriesFactory.Get<IProjectRepository>();
        }

        public ProjectDescription GetProjectDescriptionByNameInCurrentCulture(string name)
        {
            throw new NotImplementedException();
        }


        public IQueryable<ProjectDescription> GetProjectDescriptionsByCategoryID(int categoryID)
        {
            return _projectRepository.GetProjectDescriptionsByCategoryID(categoryID);
        }


        public IQueryable<ProjectDescription> GetProjectsByCategoryIdInCurrentCulture(int categoryID)
        {
            return _projectRepository.GetProjectsByCategoryIdInCurrentCulture(categoryID);
        }


        public ProjectDescription GetProjectDescriptionByIdInCurrentCulture(int id)
        {
            return _projectRepository.GetProjectDescriptionByIdInCurrentCulture(id);
        }


        public IEnumerable<ProjectDescription> GetAllProjectDescriptions()
        {
            return _projectRepository.GetAllProjectDescriptions();
        }


        public IEnumerable<ProjectDescription> GetAllProjectDescriptionsInCurrentCulture()
        {
            return _projectRepository.GetAllProjectDescriptionsInCurrentCulture();
        }


        public IList<ProjectDescription> GetRelatedProjects(int p)
        {
            return _projectRepository.GetRelatedProjects(p);
        }


        public IList<ProjectCategory> GetAllProjectCategories()
        {
            return _projectRepository.GetAllProjectCategories();
        }

        public IList<Project> GetProjectsByCategoryID(int CategoryID)
        {
            return _projectRepository.GetProjectsByCategoryID(CategoryID);
        }


        public Project GetProjectByID(int ProjectID)
        {
            return _projectRepository.GetProjectByID(ProjectID);
        }

        public IList<ProjectDescription> GetProjectDescriptionsByProjectID(int ProjectID)
        {
            return _projectRepository.GetProjectDescriptionsByProjectID(ProjectID);
        }

        public void Save()
        {
            _projectRepository.Save();
        }


        public ProjectDescription GetProjectDescriptionById(int DescriptionID)
        {
            return _projectRepository.GetProjectDescriptionById(DescriptionID);
        }


        public void AddProjectImage(ProjectImage image, int ProjectID)
        {
            _projectRepository.AddProjectImage(image, ProjectID);
        }


        public ProjectImage GetProjectImageByID(Guid ImageID)
        {
            return _projectRepository.GetProjectImageByID(ImageID);
        }


        public IList<ProjectImage> GetProjectImagesByProjectID(int ProjectID)
        {
            return _projectRepository.GetProjectImagesByProjectID(ProjectID);
        }


        public void DeleleProjectImage(Guid ImageID)
        {
            _projectRepository.DeleleProjectImage(ImageID);
        }


        public ProjectDescription GetProjectDescriptionByProjectIdAndLanguageID(int ProjectID, string LanguageID)
        {
            return _projectRepository.GetProjectDescriptionByProjectIdAndLanguageID(ProjectID, LanguageID);
        }


        public void AddProject(Project project)
        {
            _projectRepository.AddProject(project);
        }


        public void AddProjectDescription(ProjectDescription description)
        {
            _projectRepository.AddProjectDescription(description);
        }
    }
}
